<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>行内元素</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .header {
            /*这里没有宽度，利用块级元素自动展开*/
            height: 60px;
            background-color: #333;
        }

        .header .inner {
            width: 1000px;
            height: 60px;
            background-color: orange;
            margin: 0 auto;
        }

        .header .inner .logo {
            float: left;
            width: 200px;
            height: 60px;
            /* padding-top: 4px; */
            margin-right: 40px;
        }

        .header .inner .logo img {
            width: 100px;
            height: 60px;
        }
        .header .inner .nav{
            float: left;
            width: 760px;
            height: 60px;
        }
        .header .inner .nav ul{
            list-style: none;
        }
        .header .inner .nav ul li{
            float: left;
            width: 95px;
            height: 60px;
            line-height: 60px;  /*行高*/
        }
        .header .inner .nav ul li a{
            width: 95px;
            height: 60px;
            color:#eee;
            text-decoration: none;
            text-align: center;
            /* 转为块级元素 */
            display: block;    
        }
        .header .inner .nav ul li a:hover{
            background-color: gold;
        }
        
    </style>
</head>

<body>
    <div class="header">
        <div class="inner">
            <div class="logo">
                <img src="image/logo.jpg" alt="logo">
            </div>
            <div class="nav">
                <ul>
                    <li><a href="#">网站栏目</a></li>
                    <li><a href="#">网站栏目</a></li>
                    <li><a href="#">网站栏目</a></li>
                    <li><a href="#">网站栏目</a></li>
                    <li><a href="#">网站栏目</a></li>
                    <li><a href="#">网站栏目</a></li>
                    <li><a href="#">网站栏目</a></li>
                    <li><a href="#">网站栏目</a></li>
                </ul>
            </div>
        </div>
    </div>
</body>

</html>